<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>书评圈</title>
    <!-- 引入样式-->
    <link href="../imgs/2.jpeg" type="image/x-icon" rel="icon">
    <link rel="stylesheet" href="../js/element-ui/index.css">
    <!-- 引入js-->
    <script src="../js/vue.js"></script>
    <script src="../js/axios.js"></script>
    <script src="../js/http.js"></script>
    <script src="../js/element-ui/index.js"></script>
</head>

<body style="background:#f2f6fc;">
<div id="app">
    <br><br>
    <div v-for="(review,index) in reviewList">
        <el-tag>{{index+1}}.{{review.bookName}}—{{review.review}}</el-tag>
        <br>
        <el-tag style="float:right" type="success">—{{review.nickName}}-{{review.time}}</el-tag>
        <br><br>
    </div>
</div>

<script>
    let vue=new Vue({
        el:"#app",
        data:{
            reviewList:[],
        },
        created(){
            this.initReviewList();
        },
        methods:{
            initReviewList(){
                http.get("/bookReview/getByIdAndSubscribe").then(res=>{
                    this.reviewList=res.data;
                });
            },
        }
    });
</script>
</body>
</html>